package org.cubikalabs.todolist.mobile.model
{
	import mx.core.FlexGlobals;
	
	import spark.components.View;
	import spark.components.ViewNavigator;
	import spark.components.ViewNavigatorApplication;

	public class TodoListMobileNavigatorManager
	{
		private var _navigator:ViewNavigator;

		protected function getNavigator():ViewNavigator
		{
			if( !_navigator )
				_navigator = ( FlexGlobals.topLevelApplication as ViewNavigatorApplication ).navigator; 
				
			return _navigator
		}
		
		public function pushView( view:Class ):void
		{
			getNavigator().pushView( view ); // todo: others params?
		}

		public function popView():void
		{
			getNavigator().popView(); // todo: others params?
		}
	
	}
}